package oa.test;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import oa.dao.LoginDao;
import oa.dao.impl.LoginDaoImpl;
import oa.dao.impl.UserDaoImpl;
import oa.entity.Department;
import oa.entity.Login;
import oa.entity.User;
import oa.exception.DaoException;
import oa.service.UserService;
import oa.service.impl.DepartmentServiceImpl;
import oa.service.impl.UserServiceImpl;

public class test {
	public static void main(String[] args) throws DaoException, ParseException {
		DepartmentServiceImpl depart = new DepartmentServiceImpl();		
		UserDaoImpl user = new UserDaoImpl();
		Date date = new SimpleDateFormat("yyyy-MM-dd").parse("2012-4-12");
		User us = new User();
        us.setUserName("张爱国");
        us.setLoginName("17630389495");
        us.setLoginPwd("dzzag");
        us.setUserSex(1);
        us.setUserPhone("17630389495");
        us.setUserEmail("1815085525@qq.com");
        us.setUserAddress("北京市海定区");
        us.setUserIdentitycard("410329192932434321");
        us.setUserFamilyphone("12121212121");
        us.setUserDiploma("初中");
        us.setDeptId(1);
        us.setUserPosition("主管");
        
        us.setUserEntrytime(date);
        us.setCompanyId(1);
       boolean falg =user.addUser(us);
       System.out.println(falg);
	}
}
